#include <cstdio>
#include <cstring>
using namespace std;

#define NUMBER_LENGTH 11

int main()
{
    char a[NUMBER_LENGTH], b[NUMBER_LENGTH];
    while (scanf("%s %s", a, b) != EOF) {
        int a_len = strlen(a);
        int b_len = strlen(b);
        int sum = 0;
        for (int i = 0; i < a_len; i++) {
            for (int j = 0; j < b_len; j++) {
                sum += (a[i] - '0') * (b[j] - '0');
            }
        }
        printf("%d\n", sum);   
    }

    return 0;
}